Repository navigation
Signal the waiter dequeue in DefaultConnectionPool - #6607
Merged
Merged
Conversation
Motivation: A submission admitted and served by a create in the same progress remained covered in the wait queue: the notify section emitted onEnqueue after the onConnect of the create, reversing the lifecycle and leaving the SQL client pending metric off by one. onConnect itself lost its purpose with the acquisition timeout moved into the pool: client-side timer arming and waiter handle delivery are gone. Changes: The pool emits a paired bracket instead: onEnqueue when the waiter remains in the wait queue - including covered by its own connect - and onDequeue at every departure: grant, connect failure, close, cancel and deadline eviction, the latter signalled with the timeout flag and nothing else; any other dequeue is followed by the acquisition settlement. An acquisition satisfied without waiting emits neither. onTimeout is removed from the listener: the timeout flag of onDequeue replaces it and no pool emits it anymore. onConnect is deprecated for removal: SimpleConnectionPool alone still emits it and it goes away with it. SharedHttpClientConnectionGroup fails the request promise on the timeout dequeue. Assisted-by: Anthropic Claude (claude-fable-5) Signed-off-by: Julien Viet <julien@julienviet.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
A submission admitted and served by a create in the same progress
remained covered in the wait queue: the notify section emitted
onEnqueue after the onConnect of the create, reversing the lifecycle
and leaving the SQL client pending metric off by one. onConnect itself
lost its purpose with the acquisition timeout moved into the pool:
client-side timer arming and waiter handle delivery are gone.
Changes:
The pool emits a paired bracket instead: onEnqueue when the waiter
remains in the wait queue - including covered by its own connect - and
onDequeue at every departure: grant, connect failure, close, cancel
and deadline eviction, the latter signalled with the timeout flag and
nothing else; any other dequeue is followed by the acquisition
settlement. An acquisition satisfied without waiting emits neither.
onTimeout is removed from the listener: the timeout flag of onDequeue
replaces it and no pool emits it anymore. onConnect is deprecated for
removal: SimpleConnectionPool alone still emits it and it goes away
with it. SharedHttpClientConnectionGroup fails the request promise on
the timeout dequeue.
Assisted-by: Anthropic Claude (claude-fable-5)
Signed-off-by: Julien Viet julien@julienviet.com